<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <title>设备巡检</title>
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui-pull-refresh.css" />
    <link rel="stylesheet" type="text/css" href="../css/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="css/form.css" />
    <link rel="stylesheet" type="text/css" href="css/comm.css" />
    <link rel="stylesheet" type="text/css" href="css/plantasklist.css" />
    <link rel="stylesheet" type="text/css" href="css/plandevicetaskdetail.css" />
</head>

<body>
    <div id="app" v-cloak>
        <header class="topheader" id="aui-header">
            <div class="aui-tab">
                <div class="aui-tab-item tapmode" v-on:click="select_status(2)" v-bind:class="{'aui-active':form.status==2}">新增记录</div>
                <div class="aui-tab-item tapmode" v-on:click="select_status(1)" v-bind:class="{'aui-active':form.status==1}">
                    <label class="labelbox">
                      任务列表
                      <span v-if="total.ProcessCount>0" class="dotspan">{{total.ProcessCount}}</span>
                    </label>
                </div>
            </div>
        </header>
        <section v-if="form.status==1" class="aui-content contentBox">
            <section id="main_refresh" class="aui-refresh-content">
                <div class="aui_listbox">
                    <div class="aui_list" v-for="item in list" v-on:click="open_list(item)">
                        <div class="work_con_box_title">
                            <div class="work_con_box_title_name fl"><span>{{item.PlanTypeDesc}}</span>{{item.DevicePlanName}}</div>
                            <div class="work_con_box_title_statc fr">{{item.TaskStatusDesc}}</div>
                            <div class="cl"></div>
                        </div>
                        <div class="work_con_box_time marginheight">
                            <div class="work_con_box_left">时间段</div>
                            <div class="work_con_box_right">
                                <label>{{item.StartTime}}</label>
                                <label>{{item.EndTime}}</label>
                            </div>
                        </div>
                        <div class="work_con_box_name marginheight">
                            <div class="work_con_box_left">责任人</div>
                            <div class="work_con_box_right">
                                <label>{{item.TaskChargeManName}}</label>
                            </div>
                        </div>
                    </div>
                </div>
            </section>
        </section>
        <section class="aui-content contentBox" v-if="form.status==2">
            <div class="aui_formbox edit">
                <div class="aui_formitem">
                    <div class="aui_formtitle">任务类型</div>
                    <div class="aui_formcontent">
                        <label class="label-radio" v-on:click="do_select_plantype(1)">
                          <input class="aui-radio" type="radio" name="PlanType" v-bind:checked="newform.PlanType==1">巡检
                        </label>
                        <label class="label-radio" v-on:click="do_select_plantype(2)">
                          <input class="aui-radio" type="radio" name="PlanType" v-bind:checked="newform.PlanType==2">维保
                        </label>
                    </div>
                </div>
                <div class="aui_formitem">
                    <div class="aui_formtitle">所属项目</div>
                    <div class="aui_formcontent">
                        <select v-model="newform.ProjectID" placeholder="请选择">
                            <option v-for="item in ProjectList" v-bind:value="item.ID">
                              {{item.Name}}
                            </option>
                        </select>
                    </div>
                </div>
                <div class="aui_formitem">
                    <div class="aui_formtitle">设备名称</div>
                    <div class="aui_formcontent" v-on:click="do_choose_device()">
                        <input v-model="newform.DeviceName" readonly="readonly" type="text" placeholder="请选择">
                    </div>
                </div>
                <div class="aui_formitem">
                    <div class="aui_formtitle">时间</div>
                    <div class="aui_formcontent">
                        {{newform.CheckTime}}
                    </div>
                </div>
                <div class="aui_formitem">
                    <div class="aui_formtitle">负责人</div>
                    <div class="aui_formcontent">
                        {{newform.InChargeManName}}
                    </div>
                </div>
            </div>
            <div class="posibox">
                <div class="posiicon">
                    <i class="icon iconfont icon-dizhi"></i>
                </div>
                <div class="posicontent">{{newform.GPSLocation}}</div>
                <div class="posibtn" v-on:click="StartBmap()">
                    <i class="icon iconfont icon-shuaxin2-copy-copy"></i>
                </div>
            </div>
            <div class="equipment_list" v-if="standardlist.length>0">
                <div class="equipment_title">巡检标准</div>

                <!-- loop -->
                <div class="equipment_list_box" v-for="item in standardlist">
                    <div class="equipment_list_box_term">{{item.StandardName}}</div>
                    <div class="equipment_list_box_term_input">
                        <label class="label_radio" v-on:click="select_active(item,1)">
                          <input class="aui-radio" type="radio" v-bind:name="item.ID+'normal'" v-bind:checked="item.CheckStatus==1">
                          正常
                        </label>
                        <label class="label_radio" v-on:click="select_active(item,2)">
                          <input class="aui-radio" type="radio" v-bind:name="item.ID+'normal'" v-bind:checked="item.CheckStatus==2">
                          异常
                        </label>
                    </div>
                </div>
                <!-- loop -->
            </div>
            <div class="equipment_result" v-if="newform.DeviceID>0">
                <div class="equipment_result_title">
                    <div class="equipment_title">处理结果</div>
                    <div class="equipment_result_title_input">
                        <div>
                            <label class="label_radio" v-on:click="select_all_active(1)">
                              <input class="aui-radio" type="radio" name="allnormal" v-bind:checked="newform.CheckStatus==1">
                              正常
                            </label>
                            <label class="label_radio" v-on:click="select_all_active(2)">
                              <input class="aui-radio" type="radio" name="allnormal" v-bind:checked="newform.CheckStatus==2">
                              异常
                            </label>
                        </div>
                    </div>
                    <div class="cl"></div>
                </div>
                <div class="equipment_result_edit">
                    <div class="equipment_title">情况说明</div>
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-input input-pad">
                            <textarea placeholder="请填写处理结果" v-model="newform.TaskCompleteContent" style="height: 6rem;"></textarea>
                        </div>
                    </div>
                </div>
                <div class="imglist_box">
                    <div class="imglist_item" v-for="(item,index) in imglist">
                        <img v-on:click="do_viewimages(index)" class="imgitem ml4" v-bind:src="item.url" />
                        <i v-on:click="remove_img(item.index)" class="icon iconfont icon-chushaixuanxiang iconremove"></i>
                    </div>
                    <div v-if="form.TaskStatus!=3" class="imglist_item ml4">
                        <div class="img_plusbox">
                            <i v-on:click="choose_picture()" class="icon iconfont icon-addApp"></i>
                        </div>
                        <span>【最多{{maxuploadcount}}张】</span>
                    </div>
                </div>
                <div class="cl"></div>
                <div class="hide_height"></div>
            </div>
            <div class="aui_bottom">
                <div class="aui_bottombtn" v-on:click="do_save()">保存</div>
            </div>
        </section>
    </div>
</body>
<script type="text/javascript " src="../script/api.js "></script>
<script type="text/javascript " src="../script/vue.js "></script>
<script type="text/javascript" src="../script/config.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/aui-toast.js"></script>
<script type="text/javascript" src="../script/aui-tab.js"></script>
<script type="text/javascript" src="../script/aui-pull-refresh.js"></script>
<script type="text/javascript" src="../script/aui-scroll.js"></script>
<script type="text/javascript" src="../script/aui-popup.js"></script>
<script type="text/javascript " src="js/equipment.js "></script>

</html>
